<template>
	<div>
		<nav-header></nav-header>
		<nav-brids></nav-brids>
		<nav-content 
								:proDuctList='proDuctList'
								:priceFillter='priceFillter'
		></nav-content>
		<nav-footer></nav-footer>
	</div>
</template>

<script>
	import axios from 'axios'
	import NavHeader from '../common/NavHeader'
	import NavBrids from '../common/NavBrids'
	import NavContent from '../common/NavContent'
	import NavFooter from '../common/NavFooter'
	export default {
		name: 'Goods',
		components: {
			NavHeader,
			NavBrids,
			NavContent,
			NavFooter
		},
		data () {
			return {
				proDuctList: [],
				priceFillter: [
					{
						"id": "1",
						"startPrice": 0.00,
						"endPrice": 500.00
					},
					{
						"id": "2",
						"startPrice": 501.00,
						"endPrice": 1000.00
					},
					{
						"id": "3",
						"startPrice": 1001.00,
						"endPrice": 1500.00
					}
				]
			}
		},
		methods: {
			getGoodsList () {
				axios({
					method: 'get',
					url: '/goods'
				})
				.then( res=> {
					res = res.data
					
					if( res.status === 0 ) {
						const data = res.data
						this.proDuctList = data
						//console.log(data)
					}
					
				})
				.catch( err=> {
					console.log('REQUEST ERROR: ' + err)
				})
			}
		},
		mounted () {
			this.getGoodsList()
		}
	}
</script>

<style>
</style>
